require(['monitor'], function () {
	
    $('#monitor').monitor({
        canId: '33',
        onlyOnce: true,
        callback: function (data) {
        	loadData(data);
        }
    });
    
	function loadData(data) {
		$("#oilPumpClass").removeClass("monitor3-wrap-gray");
        $("#oilPumpClass").setViewData(data, 'id');
        $("#oilSt").setView(data.oilSt, [
            {value: 0, css: 'green', text: '停止'},
            {value: 1, css: 'green', text: '运行'},
            {value: 2, css: 'red', text: '故障'}
        ]);
        $("#errorLevel").setView(data.errorLevel, [
            {value: 1, css: 'red', text: '一级故障（严重故障）'},
            {value: 2, css: 'red', text: '二级故障（普通故障）'},
            {value: 3, css: 'red', text: '三级故障（报警故障）'}
        ]);
	}
	
});